const axios = require('axios');

const request = axios.create({
    baseURL: '', // api的base_url
    timeout: 60000 // 请求超时的时间
});

request.interceptors.response.use((response) => {
    const data = response.data;
    return data;
}, (error) => {
    return Promise.reject(error);
});

module.exports = request;